package work.timejay.common;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.io.Serializable;
import java.util.Optional;

/**
 * 业务层基类实现
 *
 * @author GWELL
 */
public class SuperServiceImpl<M extends BaseMapper<T>, T> extends ServiceImpl<M, T> implements SuperService<T> {

    @Override
    public Optional<T> getByIdOpt(Serializable id) {
        return Optional.ofNullable(super.getById(id));
    }

}
